package edu.zcmu.seckill.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 唐诗
 * @since 2022-02-22
 */
@Getter
@Setter
@TableName("seckill_product")
public class SeckillProduct implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 秒杀存款产品id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 存款产品id
     */
    @TableField("pid")
    private Integer pid;

    /**
     * 秒杀产品的利率
     */
    @TableField("interest")
    private BigDecimal interest;

    /**
     * 产品名称
     */
    @TableField("name")
    private String name;

    /**
     * 产品描述
     */
    @TableField("p_describe")
    private String pDescribe;

    /**
     * 产品图片
     */
    @TableField("img")
    private String img;

    /**
     * 秒杀数量
     */
    @TableField("count")
    private Integer count;

    /**
     * 秒杀价格
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 已售数量
     */
    @TableField("sale")
    private Integer sale;

    /**
     * 开始时间
     */
    @TableField("start_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @TableField("end_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @TableField("method")
    private Integer method;




}
